package com.barbeque.mall.exception;

import com.barbeque.mall.bean.BaseRespVoNoData;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author Euphonium
 * @since 2022/07/21
 */
@RestControllerAdvice
public class InvalidDataExceptionControllerAdvice {

    @ExceptionHandler(InvalidDataException.class)
    public BaseRespVoNoData invalidDataException(InvalidDataException exception) {
        exception.printStackTrace();
        return BaseRespVoNoData.error(700, "账号密码不对");
    }
}
